

set(MONITOR16X16_SRC_PATH ${PROJECT_SOURCE_DIR}/modules/Monitor64x32/sources)
set(MONITOR16X16_UI_PATH ${PROJECT_SOURCE_DIR}/modules/Monitor64x32/resources/Monitor64x32.ui)
#set(MONITOR16X16_RESRC_PATH ${PROJECT_SOURCE_DIR}/modules/Monitor64x32/resources/Monitor64x32.qrc)

file(GLOB MONITOR16X16_HEADERS ${MONITOR16X16_SRC_PATH}/../include/*.*)
foreach (FILE ${MONITOR16X16_HEADERS})
    message(STATUS "FIND ${FILE}")
endforeach ()

aux_source_directory(${MONITOR16X16_SRC_PATH} MONITOR16X16_SRC_FILES)
foreach (FILE ${MONITOR16X16_SRC_FILES})
    message(STATUS "FIND ${FILE}")
endforeach ()

qt5_wrap_ui(MONITOR16X16_UI_FILES ${MONITOR16X16_UI_PATH})
qt5_wrap_cpp(MONITOR16X16_CPP_FILES ${MONITOR16X16_SRC_FILES})
qt5_wrap_cpp(MONITOR16X16_H_FILES ${MONITOR16X16_HEADERS})
include_directories(${PROJECT_SOURCE_DIR}/modules/Monitor64x32/include)
foreach (FILE ${MONITOR16X16_SRC_FILES})
    message(STATUS "FIND ${FILE}")
endforeach ()
add_library(Monitor64x32 SHARED
        ${MONITOR16X16_UI_FILES}
        ${MONITOR16X16_CPP_FILES}
        ${MONITOR16X16_H_FILES}
        ${MONITOR16X16_SRC_FILES}
        )
#set_target_properties(Monitor64x32 PROPERTIES AUTOMOC ON)
qt5_use_modules(Monitor64x32 Core Widgets Gui OpenGL Network)
target_link_libraries(Monitor64x32
        Qt5::Widgets Qt5::Core
        CHIP8
        ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
        Qt5::Gui Qt5::OpenGL Qt5::Network
        )
